<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib uri="/WEB-INF/tlds/c.tld" prefix="c" %>
<html>
<head>
    <title>宾友娱乐</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <%-- 由于Bootstrap要基于jQuery完成，所以需要先导入jQuery的开发包 --%>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap/js/bootstrap.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/login.js?v=201712244"></script>
    <link href="${pageContext.request.contextPath}/js/bootstrap/css/bootstrap.min.css" type="text/css" rel="stylesheet">
</head>
<style>
.form-verifyCode{
    border: 1px solid #ccc;
    padding: 6px 12px;
    
    
}

</style>

<script type="text/javascript">
	
	$(function () {       
		var system ={}; 
        var p = navigator.platform;      
        system.win = p.indexOf("Win") == 0; 
        system.mac = p.indexOf("Mac") == 0; 
        system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);    
        if(system.win||system.mac||system.xll){
    		//如果是电脑跳转到弹出框 
        	$("#mobile").val("0");
        }else{  
    		//如果是手机,跳转到页签
        	$("#mobile").val("1");
        }
        
      //更换验证码
    	$(".ui_code_btn").click(
    			function() {
    				$(".ui_code_img").attr(
    						"src",
    						"${pageContext.request.contextPath}/validateCode/getValidateCode.mt?s="
    								+ new Date());
    	});
    	$(".ui_code_img").click(
    			function() {
    				$(".ui_code_img").attr(
    						"src",
    						"${pageContext.request.contextPath}/validateCode/getValidateCode.mt?s="
    								+ new Date());
    	});
        
	});
	
	
	
</script>

<body>
<div class="container">
    <%-- 由于本次的编写需要基于表单，同时还需要考虑到数据验证的问题，那么就可以不写row样式 --%>
    <form id="loginForm" action="${pageContext.request.contextPath}/admin/login.html" method="post" class="form-horizontal">
       <br>
        <fieldset>
            <legend><label onclick="changeV()"><span class="glyphicon glyphicon-user"></span>&nbsp;用户登录
            <input type="hidden" name="mobile" id="mobile" value="1"  style="width:15px;">
            </label></legend>
            <%-- 描述mid输入信息的内容 --%>
            <div class="form-group" >
            	<label class="col-md-3 control-label" ></label>
             	<div class="col-md-5">
             	<label style="color: red;"> ${message}</label>
             	</div>
            </div>
            <div class="form-group" id="midDiv">
                <label class="col-md-3 control-label" for="mid">用户名：</label>
                <div class="col-md-5">
                    <%-- id是为JavaScript服务的，而name是为了JSP的接收数据服务的 --%>
                    <input type="text" id="loginNo" name="loginNo" value="" class="form-control" placeholder="请输入登录名">	
                </div>
                <div class="col-md-4" id="loginNoSpan"></div>
            </div>
            
            <div class="form-group" id="passwordDiv">
                <label class="col-md-3 control-label" for="password">密码：</label>
                <div class="col-md-5">
                    <%-- id是为JavaScript服务的，而name是为了JSP的接收数据服务的 --%>
                    <input type="password" id="password" value="" name="password" class="form-control" placeholder="请输入登录密码">
                </div>
                <div class="col-md-4" id="passwordSpan">    </div>
            </div>
            <c:if test="${login_count>3}">
	            <div class="form-group" id="passwordDiv">
	               <label class="col-md-3 control-label" for="password">验证码：</label>
	               <div class="col-md-5">
					<input type="text" id="randCheckCode" name="randCheckCode" class="form-verifyCode" id="LoginForm_verifyCode" style="width: 150px" />
					<img src="${pageContext.request.contextPath}/validateCode/getValidateCode.html" alt="" class="ui_code_img" /> <a href="javascript:;"
						class="ui_code_btn">换一张</a>
	               </div>
	               <div class="col-md-4" id="randCheckCodeSpan"></div>
	           </div>
			</c:if>	
            <div class="form-group" id="butDiv">
                <div class="col-md-5 col-md-offset-3">
                    <button type="submit" id="subBut" class="btn  btn-primary">登录</button>
                    <button type="reset" id="rstBut" class="btn  btn-warning">重置</button>
                </div>
            </div>
            <c:if test="${login_count>2}">
				<div class="form-group" id="passwordDiv">
                <label class="col-md-3 control-label" for="password"></label>
                <div class="col-md-5">
             	 	 温馨提示：忘记密码请联系客服微信：chenxiach052
                </div>
                <div class="col-md-4" >    </div>
           	 </div>
            </c:if>
        </fieldset>
    </form>
</div>

</body>
</html>
